
package com.red.wine.exception;

public class BizException extends Exception {
	/**
	 * Used for serialization.
	 */
	private static final long serialVersionUID = -1256276854614720821L;

	private int responseCode;

	public BizException(int responseCode) {
		super();
		this.responseCode = responseCode;
	}

	public int getResponseCode() {
		return responseCode;
	}

	public boolean isServerError() {
		return responseCode >= 500 && responseCode < 600;
	}

	public boolean isClientError() {
		return responseCode >= 400 && responseCode < 500;
	}

}
